<template>
  <div>
    <el-dialog
      v-model="dialogShow"
      width="43%"
      top="5%"
      :close-on-click-modal="false"
      @close="handleclose"
      title="固件详情"
    >
      <el-form v-for="(item, index) in detailList" :key="index">
        <el-form-item :label="item.title">
          <div v-if="item.two_arr">
            <span
              v-for="(itemchild, indexchild) in item.value"
              :key="indexchild"
              >{{ itemchild }},</span
            >
          </div>
          <a v-else-if="item.isLink" :href="item.value" target="_blank">{{
            item.value
          }}</a>
          <span v-else>{{ item.value }}</span>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>
<script>
import { ref, reactive } from "vue";
import { ElMessage } from "element-plus";
import { dictionaries } from "../assets/js/dictionaries";
export default {
  components: {},
  setup(props, context) {
    const form = ref(context.attrs.form);
    const detailList = ref(context.attrs.detailList);
    const dialogShow = ref(context.attrs.dialogShow);
    const handleclose = () => {
      dialogShow.value = false;
      context.emit("handleclose", dialogShow.value);
    };
    return {
      dialogShow,
      detailList,
      form,
      handleclose,
    };
  },
};
</script>
<style lang="less" scoped>
@import "../assets/css/common.css";
@import "../assets/css/device.less";
.el-input {
  width: 215px;
}
&:deep(.el-dialog) {
  background: #fff;
}
</style>
